<template>
<div class="header">
    <div class="header-left">
        <i class="iconfont back-icon">&#xe624;</i>
    </div>
        <div class="header-input">
            <i class="iconfont search-icon">&#xe632;</i>
            输入景点/城市/游玩主题
        </div>
    <div>
        <router-link to="/city">
            <div class="header-right">{{city}}
            <i class="iconfont arrow-icon">&#xe6aa;</i>
            </div>
        </router-link>
    </div>
</div>
</template>

<script>
export default {
    name: 'homeheader',
    computed:{
            city(){
                return this.$store.state.city
            },
        }
}
</script>

 
<style scoped> 
 /* //scoped限制样式只对这一个组件生效，不会影响其他的  */
    .header{
        display :flex;
        line-height : .86rem;
        background: #00bcd4;
        color: #fff;
    }
    .header-left{
        width : .64rem;
        float : left;
        text-align: center;
    }
    .back-icon{
        font-size: .4rem;
    }
    .header-input{
        flex:1;
        margin-top: .12rem;
        height: .64rem;
        line-height: .64rem;
        margin-left: .2rem;
        background: #fff;
        border-radius: .2rem;
        color:#ccc;
        text-align:justify
    }
    .header-right{
        min-width : 1.0rem;
        padding: 0 .1rem;
        float : right;
        text-align: center;
        font-size: .28rem;
        color: #fff;
    }
    .header-right>.arrow-icon{
        margin-right: .1rem;
        font-size: .44rem;
        }
    .header-input>.search-icon{
        padding-left: .1rem;
    }

</style>